package com.jrx.anytxn.customer.dto;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
 * api 请求的基本类
 * @author Qingyao Xing
 * @date 2019/9/27 14:35
 */
public class BaseApiReq implements Serializable {

    private static final long serialVersionUID = -5012786631834068820L;
    /**
     * 交易流水号
     */
    @NotBlank(message = "流水号不能为空")
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成")
    @ApiModelProperty(value="交易流水号",example="SN369",required=true)
    private String 	seqNo;

    /**
     * 租户id
     */
    @NotBlank(message = "租户id不能为空")
    @Size(max=4, message = "租户id必须小于4位")
    @ApiModelProperty(value="租户id",example="C692",required=true)
    private String 	tenantId;

    /**
     * 渠道号
     */
    @NotBlank(message = "客户api请求中渠道不能为空")
    @ApiModelProperty(value="渠道号",example="5",required=true)
    @Size(max = 32, message = "渠道号必须小于32位")
    private String 	channel;

    /**
     * 用户编号
     */
    @NotBlank(message = "用户编号不能为空")
    @ApiModelProperty(value="用户编号",example="tr123",required=true)
    @Size(max = 20, message = "用户编号必须小于20位")
    private String 	userId;

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }
}
